<template>
  <div class="page selectMiniAppType">
    <div class="scroll-view">
      <customHeader middleTitle="选择大小号"></customHeader>
      <div class="page-body">
        <ul class="mini-app-type">
          <li class="item" @click="jumpToMiniAPP(1)" v-if="applet">
            <img class="logo" :src="config.shopImgUrlPrefix + '2020/03/02/10/753381583116032.png'" />
            <p class="name">入住享惠达人大号 帮你引流帮你赚钱</p>
            <p class="info">多种营销方式 帮您留住身边客源</p>
            <i class="right-icon zhk-list_rarrow"></i>
          </li>
          <!-- <li class="item" @click="jumpToMiniAPP(2)" v-if="wechatMini">
            <img class="logo" :src="config.shopImgUrlPrefix + '2020/03/02/10/147681583116027.png'" />
            <p class="name">开通自营小程序 我的地盘我做主</p>
            <p class="info">灵活设置各种营销活动</p>
            <i class="right-icon zhk-list_rarrow"></i>
          </li> -->
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
import Vue from "vue";
import customHeader from "../../components/header/header";
import { Toast, MessageBox } from "mint-ui";
import config from "../../base/profile/config.json";
import jsAuthority from "../../tools/jsAuthority.js";
export default {
  name: "selectMiniAppType",
  data() {
    return {
      passCount: 0,
      config: config,
      wechatMini:false,
      applet:false
    };
  },

  methods: {

    jumpToMiniAPP(type) {
      // if (!this.passCount) {
      //   MessageBox({
      //     title: "提示",
      //     message: "没有符合开通条件的门店，请联系销售人员获取资格",
      //     showCancelButton: false,
      //     confirmButtonText: "确定"
      //   }).then(action => {
      //     if (action === "confirm") {
      //     }
      //   });
      // } else {
      //   this.$router.push({
      //     path: "/miniAppManage/miniAppManageIntro/StoreChoice"
      //   });
      // }
      if(type==1){
          this.$router.push({
          path: "/selectMiniAppType/miniAppManage"
        });
      }
      if(type==2){
          this.$router.push({
          path: "/selectMiniAppType/selfMiniAppManage"
        });
      }
    }
  },

  created() {
    jsAuthority.checkedSuccess(() => {
        this.wechatMini = jsAuthority.checked(
          "app.onlineShop.wechatMini"
        );
        this.applet = jsAuthority.checked(
          "app.manage.applet"
        );

      });
  },
  components: {
    customHeader
  }
};
</script>
<style lang='scss' scoped>
@import "miniAppManage";
</style>
